<template>
	<view>
		<!-- 寻队启事弹窗 -->
		<view class="mask">
		<u-popup v-model="showTeam" mode="center" :mask-close-able="false">
			<view class="mwrap1">
				<u-avatar class="avatar" size="64" :src="avatar"></u-avatar>
				<view class="nick ellipsis">{{nickname}}</view>
				<image class="renge" v-if="mbtiType == 'ENFJ'" :src="imgPath+'/static/big/findTeam/ENFJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ENFP'" :src="imgPath+'/static/big/findTeam/ENFP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ESFJ'" :src="imgPath+'/static/big/findTeam/ESFJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ESFP'" :src="imgPath+'/static/big/findTeam/ESFP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'INFJ'" :src="imgPath+'/static/big/findTeam/INFJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'INTP'" :src="imgPath+'/static/big/findTeam/INTP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ISFJ'" :src="imgPath+'/static/big/findTeam/ISFJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ISFP'" :src="imgPath+'/static/big/findTeam/ISFP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ENTJ'" :src="imgPath+'/static/big/findTeam/ENTJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ENTP'" :src="imgPath+'/static/big/findTeam/ENTP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ESTJ'" :src="imgPath+'/static/big/findTeam/ESTJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ESTP'" :src="imgPath+'/static/big/findTeam/ESTP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'INFP'" :src="imgPath+'/static/big/findTeam/INFP.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'INTJ'" :src="imgPath+'/static/big/findTeam/INTJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ISTJ'" :src="imgPath+'/static/big/findTeam/ISTJ.png'" mode="widthFix"></image>
				<image class="renge" v-if="mbtiType == 'ISTP'" :src="imgPath+'/static/big/findTeam/ISTP.png'" mode="widthFix"></image>
				<image class="join" mode="widthFix" :src="imgPath+'/static/big/findTeam/TAjoin.png'"></image>
				<image class="find" mode="widthFix" :src="imgPath+'/static/big/findTeam/TAfind.png'"></image>
				<image class="person" mode="widthFix" :src="imgPath+'/static/big/findTeam/TA.png'"></image>
				<image class="confirmBtn" mode="widthFix" :src="imgPath+'/static/big/findTeam/invite.png'" @click="confirm"></image>
				<!-- <view class="confirm">
					<button class="shareBtn" open-type="share" ref="share"> </button>
				</view> -->
				<image class="wait" @click="goHd" mode="widthFix" :src="imgPath+'/static/big/findTeam/view.png'"></image>

			</view>
		</u-popup>
		</view>
	</view>
</template>

<script>
	import http from "@/src/http"
	export default {
		data() {
			return {
				mbtiType: '',
				avatar: '',
				nickname: '',
				showTeam: true
			}
		},
		onLoad(options) {
			this.avatar = options.avatar
			this.nickname = options.nickname
			this.mbtiType = options.mbtiType
		},
		methods: {
			loadData(){
				http.initData().then(res=>{
					this.avatar = res.data.mbtiUser.avatar
					this.nickname = res.data.mbtiUser.nickname
					this.mbtiType = res.data.mbtiUser.mbti
				})
			},
			confirm(){
				uni.redirectTo({
					url:'/pages/index?name=activeB&noload=true'
				});
			},
			goHd(){
				uni.redirectTo({
					url:'/pages/index?name=activeB&noload=true'
				});
			},
		},
		onShareAppMessage() {
			http.writeLog2({type:2});
			let params = encodeURIComponent(`/pages/activeB/findTeam/index?avatar=${this.avatar}&nickname=${this.nickname}&mbtiType=${this.mbtiType}`)
			let path = `/pages/index?page=${params}`;
			let title = `TA是光子${this.mbtiType}，正在寻找合拍小队...`
			return {
				title:title,
				path:path
			}
		}
	}
</script>

<style lang="scss" scoped>
.mwrap1{
	width: 750rpx;
	height: 1310rpx;
	display: flex;
	justify-content: center;
	position: relative;
	.avatar{
		position: absolute;
    z-index: 6;
    top: 216rpx;
    left: 130rpx;
	}
	.nick{
		position: absolute;
    z-index: 6;
    top: 212rpx;
    left: 213rpx;
    font-size: 50rpx;
    width: 255rpx;
	}
	.renge{
		width: 577rpx;
		height: 1094rpx;
		position: relative;
	}
	.join{
		position: absolute;
		width: 270rpx;
		top: 625rpx;
		left: 108rpx;
	}
	.find{
		position: absolute;
		width: 241rpx;
		top: 750rpx;
	}
	.person{
		position: absolute;
		width: 189rpx;
    top: 331rpx;
    left: 127rpx;
	}
	.wait{
		position: absolute;
		z-index: 666;
		width: 295rpx;
    height: 75rpx;
    left: 230rpx;
    bottom: 0;
	}
	.confirmBtn{
		position: absolute;
    z-index: 6;
    width: 295rpx;
		top: 1134rpx;
    left: 230rpx;
	}
	.confirm{
		position: absolute;
    z-index: 666;
    width: 295rpx;
    height: 70rpx;
		top: 1134rpx;
    left: 230rpx;
    overflow: hidden;
		.shareBtn{
			background-color: transparent !important;
			width: 295rpx;
    	height: 70rpx;
			position: relative;
			z-index: 6666;
		}
	}
}

</style>